<?php
//use Illuminate\Support\Facades\Schema;
use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
			$table->comment = '会员主表';
            $table->increments('id')->comment('会员ID');
            $table->string('xcx_open_id',100)->default('')->comment('小程序openId');
            $table->string('gzh_open_id',100)->default('')->comment('公众号openId');
            $table->string('union_id',100)->default('')->comment('微信unionId');
            $table->string('phone',20)->default('')->comment('手机号');
			$table->string('password')->default('')->comment('密码');
            $table->string('nick_name',40)->default('')->comment('昵称');
            $table->string('avatar_url')->default('')->comment('第三方头像');
			$table->integer('image_id')->nullable()->comment('用户头像');
            $table->tinyInteger('status')->default(1)->comment('状态:0=禁用,1=启用');
            $table->tinyInteger('gender')->default(0)->comment('性别:0=未知,1=男,2=女');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
